<link rel="stylesheet" href="__STATIC__/kindeditor/default/default.css" />
<script charset="utf-8" src="__STATIC__/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__STATIC__/kindeditor/zh_CN.js"></script>
	<script type="text/javascript">
	//图片上传
	KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : true,
				          uploadJson : "{:U('File/kindupload',array('session_id'=>session_id(),'type'=>'picture','filepeth'=>MODULE_NAME))}",
					 fileManagerJson : "{:U('File/kindmanageimg')}",
				     	 amangoFiles : "{:Amango_Scanfiles('Picture')}",
				});
				//单图文上传
				K("#image1_{$field['name']}").click(function() {
					editor.loadPlugin("image", function() {
						editor.plugin.imageDialog({
							clickFn : function(url, title, width, height, border, align) {
								K("#url1_{$field['name']}").val(url);
								K("#one_pic_{$field['name']}").attr('src',url);
								editor.hideDialog();
							}
						});
					});
				});
    });
</script>
<eq name="type" value="add">
                                <div class="controls">
                                    <a id="image1_{$field['name']}" style="cursor:pointer;"><img id="one_pic_{$field['name']}" src="__PUBLIC__/Admin/images/upload-pic.png"  width="135" height="113" ></a> <input name="{$field.name}" class="text input-8x" type="hidden" id="url1_{$field['name']}">
								</div>
<else/>
                                <div class="controls">
                                   <a id="image1_{$field['name']}" style="cursor:pointer;"><img id="one_pic_{$field['name']}" src="
								   <?php if(is_numeric($data[$field['name']])||empty($data[$field['name']])){
								       echo '__PUBLIC__/Admin/images/upload-pic.png';
								   } else {
								       echo $data[$field['name']];
								   }?> "  width="135" height="113" ></a> <input name="{$field.name}" class="text input-8x" type="hidden" id="url1_{$field['name']}" value="{$data[$field['name']]}" >
								</div>
</eq>